package org.fujene.structure;

public class EachContent{
	public LookupPointer content_ptr;
	public String content;
	public long ID;
	public LookupPointer nextcontent;
	public LookupPointer[] supplement_ptr;
	public String[] supplements;
	public int[] supplement_indices;

	// 読み込み用
	public EachContent(String str, long ID, LookupPointer next, LookupPointer[] supplement_ptr){
		this.content = str;
		this.nextcontent = next;
		this.ID = ID;
		this.supplement_ptr = supplement_ptr;
	}

	// 書き込み・初期化用
	public EachContent(String str, long ID, int[] supplement_indices){
		this.content = str;
		this.ID = ID;
		this.supplement_indices = supplement_indices;
	}

	public void addPointer(LookupPointer[] ptrs){
		if ((supplement_indices != null && ptrs.length == supplement_indices.length)
				|| supplement_indices == null){
			this.supplement_ptr = ptrs;
		}
	}

	public void add(String str, long ID, LookupPointer next, LookupPointer[] supplement_ptr){
		this.content = str;
		this.nextcontent = next;
		this.ID = ID;
		this.supplement_ptr = supplement_ptr;
	}
}
